package com.sg.dto.integration.component;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

/**
 * @desc CollectionsAggregationDto
 * @使用场景
 */
@Data
public class CollectionsAggregationDto extends BaseDto implements Serializable {

    /**
     * 通用主键ID
     */
    @ApiModelProperty("通用主键ID")
    private String commPrimaryKey;

    /**
     * 自定义字段1
     */
    @ApiModelProperty("自定义字段1")
    private String customField1;

    /**
     * 自定义字段2
     */
    @ApiModelProperty("自定义字段2")
    private String customField2;

    /**
     * 自定义字段3
     */
    @ApiModelProperty("自定义字段3")
    private String customField3;

    /**
     * 自定义字段4
     */
    @ApiModelProperty("自定义字段4")
    private String customField4;

    /**
     * 自定义字段5
     */
    @ApiModelProperty("自定义字段5")
    private String customField5;

    /**
     * 自定义字段6
     */
    @ApiModelProperty("自定义字段6")
    private String customField6;

    /**
     * 自定义字段7
     */
    @ApiModelProperty("自定义字段7")
    private String customField7;

    /**
     * 自定义字段8
     */
    @ApiModelProperty("自定义字段8")
    private String customField8;

    /**
     * 通用数值字段1（小数型）
     */
    @ApiModelProperty("通用数值字段1（小数型）")
    private Double comFloatField1;

    /**
     * 通用数值字段2（小数型）
     */
    @ApiModelProperty("通用数值字段2（小数型）")
    private Double comFloatField2;

    /**
     * 通用数值字段3（小数型）
     */
    @ApiModelProperty("通用数值字段3（小数型）")
    private Double comFloatField3;

    /**
     * 通用数值字段4（小数型）
     */
    @ApiModelProperty("通用数值字段4（小数型）")
    private Double comFloatField4;

    /**
     * 通用数值字段5（小数型）
     */
    @ApiModelProperty("通用数值字段5（小数型）")
    private Double comFloatField5;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        CollectionsAggregationDto that = (CollectionsAggregationDto) o;
        return (
                commPrimaryKey == that.commPrimaryKey &&
                        customField1 == that.customField1 &&
                        customField2 == that.customField2 &&
                        customField3 == that.customField3 &&
                        customField4 == that.customField4 &&
                        customField5 == that.customField5 &&
                        customField6 == that.customField6 &&
                        customField7 == that.customField7 &&
                        customField8 == that.customField8 &&
                        comFloatField1 == that.comFloatField1 &&
                        comFloatField2 == that.comFloatField2 &&
                        comFloatField3 == that.comFloatField3 &&
                        comFloatField4 == that.comFloatField4 &&
                        comFloatField5 == that.comFloatField5
        );
    }

    @Override
    public int hashCode() {
        return Objects.hash(
                super.hashCode(),
                commPrimaryKey,
                customField1,
                customField2,
                customField3,
                customField4,
                customField5,
                customField6,
                customField7,
                customField8,
                comFloatField1,
                comFloatField2,
                comFloatField3,
                comFloatField4,
                comFloatField5
        );
    }

}
